package server;
import server.tool.Store;
import server.tool.idProduce.SnowFlakeWorker;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class ServerInit implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("========================================监听器启动=====================================");
        System.out.println("==INIT:{数字id生成器}:{plug.tool.idProduce}=======================初始化================");
        Store.getInstance().setSnowFlakeWorker(new SnowFlakeWorker(0,0));
    }
}
